home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8690 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: gettimeofday() makes me mad !
  5. Date: 5 Mar 96 11:44:33 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.826026273@rscernix>
  8. References: <208_9602292012@dudd.uniserve.com> <3136F957.5340@cmt.lpr.mail.carel.fi>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <3136F957.5340@cmt.lpr.mail.carel.fi> Ari Lukumies <aril@cmt.lpr.mail.carel.fi> writes:
  13.  
  14. >Carl wrote:
  15. >> 
  16. >> What about if you use a function similar to the Borland  clock_t() which
  17. >> returns the amount of clock ticks since program start.  Don't clock ticks
  18. >> happen like 18 times per second on most systems?
  19. >
  20. >In PC, yes. 
  21.  
  22. Maybe on yours, definitely not on mine.
  23.  
  24. >In HP, no. 
  25.  
  26. Don't be so sure.  A Vectra running Windows is an HP, too :-)
  27.  
  28. >In Tandem, no. In AS/400, no. In ... (fill in your favorite 
  29. >machine). In Unix, use the function 'ftime'.
  30.  
  31. Don't!  In Unix, gettimeofday() is the right thing.  ftime is obsolete
  32. and is provided only for compatibility with very old applications
  33. (on some systems (e.g. HP-UX, AIX and Solaris) you have to link special
  34. compatibility libraries to get it).
  35.  
  36. Dan
  37. --
  38. Dan Pop
  39. CERN, CN Division
  40. Email: danpop@mail.cern.ch 
  41. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  42.